1. Field of the Invention
The present invention generally relates to object oriented programming (OOP) systems and, more particularly, to OOP systems supporting the Java.TM. programming language.
2. Background Description
In current implementations of Java.TM., method invocations may involve a search through a method table to identify the (address of the) function to be invoked. A cache may be used to eliminate the search under certain circumstances. In contrast, a method invocation (typically referred to as a virtual function call) in C++ usually requires only a constant overhead: the address of the function to be invoked is obtained by simply indexing into a virtual function table, where the index value itself is a compile time constant. Thus, method invocations in current implementations of Java.TM. can be considerably more expensive than method invocations in C++. The present invention is directed at improving the performance of method invocation in OOP systems such as Java.TM..
In order to better understand the invention, some background material is presented regarding inheritance in the Java.TM. programming language, casts and method invocations in the Java.TM. programming language, and the implications of inheritance and method invocations on the object model utilized by current implementations of the Java.TM. programming language.